package cn.stylefeng.guns.goods.mapper;

import cn.stylefeng.guns.goods.entity.GoodData;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.stylefeng.guns.goods.entity.Goods;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * goods Mapper 接口
 *
 * @author aria
 * @date 2021/02/20 20:24
 */
public interface GoodsMapper extends BaseMapper<Goods> {
    @Select("SELECT type name,SUM(goods_volume) value FROM goods GROUP BY type ORDER BY type")
    List<GoodData> selectData();
}